function qs = ElnqZ_losses(vars)

% E[ln q(Z)]

K = size(vars.Z, 2);

qs = zeros(1, K);
for k = 1:K
    comps = [1:(k-1) (k+1):K];
    Z = vars.Z(:, comps) + realmin;
    Z = Z./(sum(Z, 2)*ones(1, K-1));
    
    qs(k) = sum(sum(Z.*log(Z+realmin)));
end
